<template>
  <div :class="[ ...classes ]" :style="styleses">{{weather}}</div>
</template>
<script>
import axios from "axios";

import titlemixins from "@/mixins/bigScreen/titlemixins";

export default {
  name: 'titleweather',
  mixins: [titlemixins],
  components: {},
  props: {
    content: {
      default: () => {
        return {
          name: "郑州"
        };
      }
    }
  },
  data() {
    return {
      weather: "test"
    };
  },
  computed: {},
  watch: {},
  mounted() {
    this.loadData();
  },
  methods: {
    loadData() {
      let _this = this;
      axios
        .get("http://wthrcdn.etouch.cn/weather_mini?city=" + this.content.name)
        .then(res => {
          _this.weather =
            res.data.data.forecast[0].type +
            res.data.data.forecast[0].low.split(" ")[1];
        });
    }
  }
};
</script>
<style lang='scss' scoped>
</style>